package com.tjc.spring.core.resource;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * @Author: tjc
 * @description
 * @Date Created in 22:55 2021-12-21
 */
public class FileSystemResource implements Resource{
    String path;
    public FileSystemResource(String path) {
        this.path = path;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        File file = new File(path);
        return new FileInputStream(file);
    }
}
